<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tld/authority.tld" prefix="authority" %>
<%@ taglib uri="/tld/navigator.tld" prefix="navigator" %>
<%@ taglib uri="/tld/pagination.tld" prefix="page" %>

<%--<div class="pageheader">
    <h2>类别档次管理</h2>

    <div class="breadcrumb-wrapper">
        <span class="left color-999 font13">您当前的位置：</span>
        <ol class="breadcrumb left">
            <li>参数管理</li>
            <li>类别档次管理</li>
        </ol>
    </div>
</div>--%>
<navigator:navigator url="phase/query.htm"/>

<div class="contentpanel">

    <div class="panel panel-default panel-bottom-no">
        <div class="row">
            <form>
                <input type="hidden" name="start" value="${query.start}">
                <input type="hidden" name="length" value="${query.length}">
                <input type="hidden" name="categoryId" value="${query.categoryId}">
                <div class="panel-body panel-body2 border-gray-b ">
                    <div class="col-md-6">
                        <div class="form-group before-after-none" style="display:table; width:100%;">
                            <label class="col-sm-2 control-label control-label2">类别：</label>
                            <div class="col-sm-6">
                                <div class="select-container select">
                                    <select class="select select-offscreen categoryLv1">
                                        <option value="">-请选择-</option>
                                        <c:forEach items="${categoryLv1List}" var="item">
                                            <option value="${item.id}" ${item.id == categoryLv1Id ? 'selected' : ''}>${item.name}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group before-after-none">
                            <div class="col-sm-6">
                                <div class="select-container select">
                                    <select class="select select-offscreen categoryLv2">
                                        <option value="">-请选择-</option>
                                        <c:forEach items="${categoryLv2List}" var="item">
                                            <option value="${item.id}" ${item.id == categoryLv2Id ? 'selected' : ''}>${item.name}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="btn-group2 left">
                        <button type="submit" class="btn btn-primary btn-4-query"><i class="icon icon-chaxun"></i>查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="panel panel-default">

        <div class="row">
            <div class="panel-body panel-body2  plr20">

                <div class="left">
                    <div class="btn-group left btn-group-none2">
                        <authority:authority url="/phase/add">
                            <button class="btn btn-primary btn-4-add"><i class="icon icon-tianjia"></i>新增</button>
                        </authority:authority>
                    </div>
                </div>
            </div>
        </div>

        <%--Table--%>
        <div class="row">
            <div class=" plr20">
                <div class="table-responsive">
                    <table class="table dataTable">
                        <tbody>
                        <tr>
                            <th style="width: 50px;"></th>
                            <th><strong>类别名称</strong></th>
                            <th><strong>档次</strong></th>
                            <th><strong>档次编码</strong></th>
                            <th><strong>备注</strong></th>
                            <th><strong>操作</strong></th>
                        </tr>
                        <c:forEach items="${paging.items}" var="item" varStatus="status">
                            <tr>
                                <td>${(paging.pageIndex - 1) * paging.pageSize + (status.index + 1)}</td>
                                <td>${item.categories}</td>
                                <td>${item.name}</td>
                                <td>${item.identifier}</td>
                                <td>${item.remark}</td>
                                <td>
                                    <authority:authority url="/phase/modify">
                                        <a class="btn-4-modify" data-id="${item.id}">修改</a>
                                    </authority:authority>
                                    <authority:authority url="/phase/delete">
                                        <a class="btn-4-delete margin-l-10" data-id="${item.id}">删除</a>
                                    </authority:authority>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <page:page pageIndex="${paging.pageIndex}" pageSize="${paging.pageSize}" count="${paging.count}"/>
            </div>
        </div>
    </div>
    <script src="js/dictionary/phase-List.js" charset="UTF-8"></script>
</div>